﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using InformaticaDiary.Common;
using System.ServiceModel.Web;

namespace InformaticaDiaryWeb.Service
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IInformaticaService" in both code and config file together.
    [ServiceContract]
    public interface IInformaticaService
    {
        [WebGet(UriTemplate = "test", ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        string test();

        [WebInvoke(Method = "POST", UriTemplate = "Delete", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
        [OperationContract]
        ExecutedResult Delete(long Id);

        [WebInvoke(Method = "POST", UriTemplate = "Fetch", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
        [OperationContract]
        CaseDetails Fetch(long Id);

        [WebGet(UriTemplate = "Maxid?strprint={strprint}", ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        long Maxid(string strprint);

        [WebGet(UriTemplate = "Maxid1", ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        long Maxid1();

        [WebGet(UriTemplate = "Maxid2", ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        long Maxid2();

        [WebInvoke(Method = "POST", UriTemplate = "Insert", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
        [OperationContract]
        ExecutedResult Insert(CaseDetails objCD);

        [WebInvoke(Method = "POST", UriTemplate = "Update", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
        [OperationContract]
        ExecutedResult Update(CaseDetails objCD);

        [WebInvoke(Method = "POST", UriTemplate = "Login", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
        [OperationContract]
        ExecutedResult Login(LoginRequest objLoginRequest);

    }
}
